package data;

import java.util.HashMap;

public class Game {
	
	HashMap<Player, Double> game = null;	
		
	public Game(Player[] aPlayers, Double[] aRes) {		
		game = new HashMap<Player, Double>();
		if (aPlayers.length != 3){
			return;
		}
		if (aRes.length != 3){
			return;
		}
		for (int i = 0; i < aPlayers.length; i++){
			game.put (aPlayers[i], aRes[i]);
		}
	}
	
	public Player[] getPlayers(){
		return game.keySet ().toArray (new Player[0]);
	}
	
	public double getResult(Player aPlayer){
		return game.get (aPlayer);
	}
}
